-- 大力士举哑铃【没啥用的功能】
local keybind = GetModConfigData("sw_lx_dumbbell")
if not keybind then
    return
end


GLOBAL.TheInput:AddKeyUpHandler(keybind, function()
    if not InGame() then
        return
    end
    if not GLOBAL.ThePlayer or GLOBAL.ThePlayer.prefab ~= "wolfgang" then
        return
    end
    local hand = GetEquippedItemFrom("hands")
    local eq = GetItemFromAll(nil, {"dumbbell"}, function(ent)
        if hand and hand:HasTag("dumbbell") then
            return ent == hand
        else
            return true
        end
    end)
    if eq then
        GLOBAL.ThePlayer.replica.inventory:UseItemFromInvTile(eq)
    end
end)
